<%@page import="com.crm.entity.Opportunity,com.crm.beans.QuotParts,com.crm.util.Constants,com.crm.entity.Clientdet,com.crm.util.Constants,java.util.List,com.crm.entity.Parts,com.crm.entity.Currency,com.crm.entity.Variables,com.crm.entity.Quotation,com.crm.entity.Business,com.crm.beans.NewQuotVO" %>
<% 
	Quotation q=(Quotation)request.getAttribute("quotation");
	List<QuotParts> qp=(List<QuotParts>)request.getAttribute("quotparts");
	System.out.println("Quot Parts List is: "+qp);
%>	
<div class="boxIFS">
  <table width="100%" >
  <tr>  <td>
  &nbsp;</td>
  <td align="left" width="50%"> 
 Quotation No .&nbsp; <input name="quotno" type="text" class="form"  style=" width:300px ; color: blue;" id="quotno" value="<%=q.getQuotno()%>" />
</td>
<td align="center" width="50%">
</td>
</tr>

</table>
		
		
        <table id="quotPartTable" width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
        <tr>
         
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"  style="background-repeat:repeat-x">S.No </td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Part No.</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Make</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Description</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Required</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Source</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Supplier</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Unit Value</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Fright(Individual)</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Assesable</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">BCD</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Sub Total</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Margin</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">UnitPrice</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">QuotePrice</td>
            <td  align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Delivery</td>
          </tr>
          <%
			for(int i=0;i<qp.size();i++){ %>
          <tr>
          
            <td align="center" bgcolor="#FFFFFF"><%=i+1 %></td>
       
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="partid<%=i+1%>" type="hidden"  size="5" value="<%=qp.get(i).getPartNo()%>" /><input name="partno<%=i+1%>" type="text"  class="part" size="5" value="<%=qp.get(i).getPartNo()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="make<%=i+1 %>" type="text" size="5"   value="<%=qp.get(i).getMake()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="desc<%=i+1 %>" type="text" size="5" value="<%=qp.get(i).getDesc()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="required<%=i+1 %>" type="text" id="reqtyqid<%=i+1 %>" size="5" value="<%=qp.get(i).getQty()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="required<%=i+1 %>" type="text" id="reqtyqid<%=i+1 %>" size="5" value="<%=qp.get(i).getSource()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="required<%=i+1 %>" type="text" id="reqtyqid<%=i+1 %>" size="5" value="<%=qp.get(i).getSupplier()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="uvalue<%=i+1 %>" id="unitid<%=i+1 %>" type="text" size="5" value="<%=qp.get(i).getUnitValue()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="fright<%=i+1 %>"  id="frightid<%=i+1 %>" type="text" size="5"  value="<%=qp.get(i).getFright() %>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="assesable<%=i+1 %>" id="assesid<%=i+1%>" type="text" size="5" value="<%=qp.get(i).getFright()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="assesable<%=i+1 %>" id="assesid<%=i+1%>" type="text" size="5" value="<%=qp.get(i).getAssesableValue()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="assesable<%=i+1 %>" id="assesid<%=i+1%>" type="text" size="5" value="<%=qp.get(i).getBcd()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="stot<%=i+1 %>" type="text"  id="totid<%=i+1 %>" size="5" value="<%=qp.get(i).getTotalcost() %>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="margin<%=i+1 %>" type="text" id="marginid<%=i+1 %>" size="5" value="<%=qp.get(i).getMargin() %>" /></td>
           <td align="left" valign="top" bgcolor="#FFFFFF"><input name="unitprice<%=i+1 %>" type="text" id="unitprcie<%=i+1 %>" size="5" value="<%=qp.get(i).getUnitPrice()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="quotprice<%=i+1 %>" type="text" id="qpriceid<%=i+1 %>" size="5" value="<%=qp.get(i).getQuotePrice() %>" /></td>
             <td align="left" valign="top" bgcolor="#FFFFFF"><input name="delivery<%=i+1 %>"  type="text" size="5" value="<%=qp.get(i).getDelivery()%>"/></td>
          </tr>
         <%} %>
            
        </table>
   		<div>
   		</div>
	    </div> 